<!doctype html>



  


<html class="theme-next muse use-motion">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />












  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  
    
      
    

    
  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Microsoft YaHei:300,300italic,400,400italic,700,700italic|consolas:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.4.0" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.0.2" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="ionic,cordova,tools," />








  <link rel="shortcut icon" type="image/x-icon" href="http://ofy7k3v4s.bkt.clouddn.com/mylogo.png?v=5.0.2" />






<meta name="description" content="java&amp;#x73AF;&amp;#x5883;Android ADT&amp;#x9700;&amp;#x8981;
1&amp;#x3001;JDK&amp;#x4E0B;&amp;#x8F7D;&amp;#x5730;&amp;#x5740;&amp;#xFF1A;
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2&amp;#x3001;&amp;#x914">
<meta property="og:type" content="article">
<meta property="og:title" content="混合APP开发环境配置-ionic、cordora">
<meta property="og:url" content="https://hongqinma.github.io/2016/11/24/t12-混合APP开发环境配置/index.html">
<meta property="og:site_name" content="HongqinMa' Blog">
<meta property="og:description" content="java&amp;#x73AF;&amp;#x5883;Android ADT&amp;#x9700;&amp;#x8981;
1&amp;#x3001;JDK&amp;#x4E0B;&amp;#x8F7D;&amp;#x5730;&amp;#x5740;&amp;#xFF1A;
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2&amp;#x3001;&amp;#x914">
<meta property="og:image" content="https://hongqinma.github.io/2016/11/24/t12-混合APP开发环境配置/Android-SDK-01.png">
<meta property="og:image" content="https://hongqinma.github.io/2016/11/24/t12-混合APP开发环境配置/Android-SDK-02.png">
<meta property="og:image" content="https://hongqinma.github.io/2016/11/24/t12-混合APP开发环境配置/Android-SDK-03.png">
<meta property="og:image" content="https://hongqinma.github.io/2016/11/24/t12-混合APP开发环境配置/Android-SDK-04.png">
<meta property="og:image" content="https://hongqinma.github.io/2016/11/24/t12-混合APP开发环境配置/Android-SDK-06.png">
<meta property="og:image" content="https://hongqinma.github.io/2016/11/24/t12-混合APP开发环境配置/Android-SDK-05.png">
<meta property="og:updated_time" content="2016-12-23T00:54:50.103Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="混合APP开发环境配置-ionic、cordora">
<meta name="twitter:description" content="java&amp;#x73AF;&amp;#x5883;Android ADT&amp;#x9700;&amp;#x8981;
1&amp;#x3001;JDK&amp;#x4E0B;&amp;#x8F7D;&amp;#x5730;&amp;#x5740;&amp;#xFF1A;
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2&amp;#x3001;&amp;#x914">
<meta name="twitter:image" content="https://hongqinma.github.io/2016/11/24/t12-混合APP开发环境配置/Android-SDK-01.png">



<script type="text/javascript" id="hexo.configuration">
  var NexT = window.NexT || {};
  var CONFIG = {
    scheme: 'Muse',
    sidebar: {"position":"left","display":"post"},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '6347850919329138000',
      author: 'Hiraku'
    }
  };
</script>




  <link rel="canonical" href="https://hongqinma.github.io/2016/11/24/t12-混合APP开发环境配置/"/>


  <title> 混合APP开发环境配置-ionic、cordora | HongqinMa' Blog </title>
</head>

<body itemscope itemtype="//schema.org/WebPage" lang="en">

  



  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "//hm.baidu.com/hm.js?10010323";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>








  
  
    
  

  <div class="container one-collumn sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="//schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta custom-logo">
  
    <div class="site-meta-headline">
      <a>
        <img class="custom-logo-image" src="http://ofy7k3v4s.bkt.clouddn.com/photo.jpg"
             alt="HongqinMa' Blog"/>
      </a>
    </div>
  

  <div class="custom-logo-site-title">
    <a href="/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">HongqinMa' Blog</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
  <p class="site-subtitle">Spell at all costs， to rush you in the future。</p>
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            Categories
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            About
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            Archives
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            Tags
          </a>
        </li>
      

      
    </ul>
  

  
</nav>

 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  
  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="//schema.org/Article">

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                混合APP开发环境配置-ionic、cordora
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            <span class="post-meta-item-icon">
              <i class="fa fa-calendar-o"></i>
            </span>
            <span class="post-meta-item-text">Posted on</span>
            <time itemprop="dateCreated" datetime="2016-11-24T08:22:34+08:00" content="2016-11-24">
              2016-11-24
            </time>
          </span>

          
            <span class="post-category" >
              &nbsp; | &nbsp;
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">In</span>
              
                <span itemprop="about" itemscope itemtype="https://schema.org/Thing">
                  <a href="/categories/Hybrid-APP-开发系列/" itemprop="url" rel="index">
                    <span itemprop="name">Hybrid APP 开发系列</span>
                  </a>
                </span>

                
                

              
            </span>
          

          
            
              <span class="post-comments-count">
                &nbsp; | &nbsp;
                <a href="/2016/11/24/t12-混合APP开发环境配置/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count ds-thread-count" data-thread-key="2016/11/24/t12-混合APP开发环境配置/" itemprop="commentsCount"></span>
                </a>
              </span>
            
          

          

          

          
              &nbsp; | &nbsp;
              <span class="page-pv"><i class="fa fa-file-o"></i>
              <span class="busuanzi-value" id="busuanzi_value_page_pv" ></span>
              </span>
          

          
            <span id="busuanzi_container_page_pv">  <span id="busuanzi_value_page_pv"></span> Views</span>
          
        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="java&#x73AF;&#x5883;"><a href="#java&#x73AF;&#x5883;" class="headerlink" title="java&#x73AF;&#x5883;"></a>java&#x73AF;&#x5883;</h2><p>Android ADT&#x9700;&#x8981;</p>
<p>1&#x3001;JDK&#x4E0B;&#x8F7D;&#x5730;&#x5740;&#xFF1A;</p>
<p><a href="http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html" target="_blank" rel="external">http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html</a></p>
<p>2&#x3001;&#x914D;&#x7F6E; Java &#x7684;&#x73AF;&#x5883;&#x53D8;&#x91CF; JAVA_HOME &#x548C; CLASSPATH</p>
<p>JAVA_HOME &#x662F; java &#x7684;&#x5B89;&#x88C5;&#x76EE;&#x5F55;&#x7684; bin &#x76EE;&#x5F55;</p>
<p>JAVA_HOME: D:\Program Files\Java\jdk1.8.0_91 </p>
<p>CLASSPATH: .;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;</p>
<p>&#x6211;&#x81EA;&#x5DF1;&#x7684;&#x914D;&#x7F6E;&#x5982;&#x4E0B;&#xFF1A;</p>
<blockquote>
<p>JAVA_HOME   C:\Program Files\Java\jdk1.8.0_112<br>Path:  %JAVA_HOME%\jre\bin;%JAVA_HOME%\bin;<br>CLASSPAHT: .;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;</p>
</blockquote>
<p><a href="http://jingyan.baidu.com/article/f96699bb8b38e0894e3c1bef.html" target="_blank" rel="external">&#x914D;&#x7F6E; Java &#x73AF;&#x5883;&#x53D8;&#x91CF;&#x7684;&#x65B9;&#x6CD5;</a></p>
<h2 id="C-&#x73AF;&#x5883;"><a href="#C-&#x73AF;&#x5883;" class="headerlink" title="C++ &#x73AF;&#x5883;"></a>C++ &#x73AF;&#x5883;</h2><p>&#x9700;&#x8981; c++ &#x73AF;&#x5883;&#xFF0C;window 10 &#x5DF2;&#x81EA;&#x5E26;&#xFF0C;&#x5176;&#x4ED6;&#x7CFB;&#x7EDF;&#x53EA;&#x9700;&#x5B89;&#x88C5; vs2016&#xFF0C;&#x628A; c++ &#x73AF;&#x5883;&#x52FE;&#x9009;&#x5373;&#x53EF;&#x3002;</p>
<h2 id="Android-ADT&#x73AF;&#x5883;"><a href="#Android-ADT&#x73AF;&#x5883;" class="headerlink" title="Android ADT&#x73AF;&#x5883;"></a>Android ADT&#x73AF;&#x5883;</h2><p>&#x6253;&#x5305;android&#x5E94;&#x7528;&#x7684;&#x65F6;&#x5019;&#x9700;&#x8981;</p>
<p>1&#x3001;&#x4E0B;&#x8F7D;&#x5B89;&#x88C5;ADT&#x6240;&#x9700;&#x8981;&#x7684;&#x624B;&#x52A8;&#x5B89;&#x88C5;&#x5305; </p>
<p><a href="http://www.androiddevtools.cn/" target="_blank" rel="external">http://www.androiddevtools.cn/</a></p>
<p><img src="/2016/11/24/t12-&#x6DF7;&#x5408;APP&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x914D;&#x7F6E;/Android-SDK-01.png" alt="&#x6DF7;&#x5408;APP&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x914D;&#x7F6E;"><br><img src="/2016/11/24/t12-&#x6DF7;&#x5408;APP&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x914D;&#x7F6E;/Android-SDK-02.png" alt="&#x6DF7;&#x5408;APP&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x914D;&#x7F6E;"><br><img src="/2016/11/24/t12-&#x6DF7;&#x5408;APP&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x914D;&#x7F6E;/Android-SDK-03.png" alt="&#x6DF7;&#x5408;APP&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x914D;&#x7F6E;"></p>
<p>&#x9700;&#x8981;&#x7684;&#x5305;&#x7684;&#x622A;&#x56FE;</p>
<p><img src="/2016/11/24/t12-&#x6DF7;&#x5408;APP&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x914D;&#x7F6E;/Android-SDK-04.png" alt="&#x6DF7;&#x5408;APP&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x914D;&#x7F6E;"></p>
<h2 id="node-&#x73AF;&#x5883;"><a href="#node-&#x73AF;&#x5883;" class="headerlink" title="node &#x73AF;&#x5883;"></a>node &#x73AF;&#x5883;</h2><p>node &#x9700;&#x8981;&#x4F7F;&#x7528;&#x7A33;&#x5B9A;&#x7248;&#x672C;&#xFF0C;&#x5982;&#x679C;&#x9700;&#x8981;&#x7BA1;&#x7406;&#x591A;&#x4E2A;&#x7248;&#x672C;&#xFF0C;&#x4F7F;&#x7528; nvm&#xFF0C;&#x5982;&#x679C;&#x662F; windows &#x7CFB;&#x7EDF;&#xFF0C;&#x90A3;&#x4E48;&#x4F7F;&#x7528; nvm &#x7684; windows &#x7248;&#x672C;&#x3002;</p>
<p>nvm &#x7684;&#x4E0B;&#x8F7D;&#x5B89;&#x88C5;&#x5730;&#x5740;(windows&#x7248;)&#xFF1A;<a href="https://github.com/coreybutler/nvm-windows" target="_blank" rel="external">https://github.com/coreybutler/nvm-windows</a></p>
<p>&#x5728; nvm v1.1.1 &#x7248;&#x672C;&#x4E2D;&#xFF0C;&#x867D;&#x7136;&#x6CA1;&#x6709;&#x5B8C;&#x6210;&#x901A;&#x8FC7;&#x547D;&#x4EE4;&#x884C;&#x914D;&#x7F6E;&#x955C;&#x50CF;&#x7684;&#x529F;&#x80FD;&#xFF08;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x8FD9;&#x4E24;&#x6761;&#x547D;&#x4EE4;&#xFF0C;&#x4F46;&#x65E0;&#x6548;&#x2026;&#x2026;&#x4E0D;&#x4E0D;&#x77E5;&#x4F5C;&#x8005;&#x600E;&#x4E48;&#x60F3;&#x7684;&#xFF09;&#xFF0C;&#x4F46;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x8BBE;&#x7F6E;&#x6587;&#x4EF6;&#x6765;&#x914D;&#x7F6E;&#x955C;&#x50CF;&#x6E90;&#x3002;</p>
<p>&#x5728; nvm &#x5B89;&#x88C5;&#x76EE;&#x5F55;&#x4E2D;&#x5BFB;&#x627E; setting.txt &#x6587;&#x4EF6;&#xFF0C;&#x6253;&#x5F00;&#x540E;&#x8BBE;&#x7F6E;&#x5982;&#x4E0B;&#x4E24;&#x6761;&#xFF1A;</p>
<blockquote>
<p>node_mirror: <a href="https://npm.taobao.org/mirrors/node/" target="_blank" rel="external">https://npm.taobao.org/mirrors/node/</a><br>npm_mirror: <a href="https://npm.taobao.org/mirrors/npm/" target="_blank" rel="external">https://npm.taobao.org/mirrors/npm/</a></p>
</blockquote>
<ul>
<li><code>nvm install node&#x7248;&#x672C;&#x53F7;</code> &#x5B89;&#x88C5;&#x5177;&#x4F53;&#x7248;&#x672C;&#x7684; node</li>
<li><code>nvm use 7.0.0</code> &#x5207;&#x6362;&#x5230;&#x5DF2;&#x5B89;&#x88C5;&#x7684;&#x5177;&#x4F53;&#x7248;&#x672C;</li>
<li><code>nvm ls</code> &#x5217;&#x51FA;&#x672C;&#x5730;&#x5DF2;&#x5B89;&#x88C5;&#x7684;&#x6240;&#x6709;&#x7684; node &#x73AF;&#x5883;&#x7248;&#x672C;</li>
</ul>
<p>&#x5982;&#x679C;&#x4E0B;&#x8F7D;&#x4E0D;&#x6210;&#x529F;&#xFF0C;&#x4F7F;&#x7528;&#x4EE3;&#x7406;&#x670D;&#x52A1;&#x5668;&#x4E0B;&#x8F7D;&#x5B89;&#x88C5;&#xFF0C;&#x5982;: <code>shadowsocks</code></p>
<ul>
<li><code>nvm proxy 127.0.0.1:1008</code>&#xFF0C;<code>127.0.0.1:1008</code>&#x662F;&#x4EE3;&#x7406;&#x5730;&#x5740;&#xFF0C;&#x4F7F;&#x7528;&#x7684;&#x662F;&#x670D;&#x52A1;&#x5668;&#x4E0B;&#x8F7D;</li>
<li><code>nvm install 7.0.0</code></li>
</ul>
<h2 id="Git&#x73AF;&#x5883;"><a href="#Git&#x73AF;&#x5883;" class="headerlink" title="Git&#x73AF;&#x5883;"></a>Git&#x73AF;&#x5883;</h2><p>ng-cordova &#x63D2;&#x4EF6;&#x9700;&#x8981;&#xFF0C;&#x6E90;&#x4EE3;&#x7801;&#x7BA1;&#x7406;</p>
<p>git &#x7684;&#x4E0B;&#x8F7D;&#x5730;&#x5740;&#xFF1A;<a href="https://git-scm.com/downloads" target="_blank" rel="external">https://git-scm.com/downloads</a></p>
<p>&#x4E0B;&#x8F7D;&#x540E;&#x76F4;&#x63A5;&#x5B89;&#x88C5;&#xFF0C;&#x6211;&#x8FD9;&#x8FB9;&#x6CA1;&#x6709;&#x914D;&#x73AF;&#x5883;&#x76F4;&#x63A5;&#x53EF;&#x7528;</p>
<h2 id="cordova-ionic"><a href="#cordova-ionic" class="headerlink" title="cordova ionic"></a>cordova ionic</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ npm install -g cordova ionic</div></pre></td></tr></table></figure>
<h2 id="3-&#x6761;&#x547D;&#x4EE4;"><a href="#3-&#x6761;&#x547D;&#x4EE4;" class="headerlink" title="3 &#x6761;&#x547D;&#x4EE4;"></a>3 &#x6761;&#x547D;&#x4EE4;</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">ionic start myApp</div><div class="line">&#x5728; myApp &#x9879;&#x76EE;&#x8DDF;&#x76EE;&#x5F55;&#x4E0B;&#x6267;&#x884C;&#x4E0B;&#x9762;&#x547D;&#x4EE4;</div><div class="line">ionic platform add android</div><div class="line">ionic build android</div><div class="line">ionic run android</div></pre></td></tr></table></figure>
<p>&#x6267;&#x884C; <code>ionic platform add android</code> &#x8FC7;&#x7A0B;&#x4E2D;&#x5982;&#x679C;&#x51FA;&#x9519;&#xFF0C;&#x62A5; error occurred during initialization of vm&#xFF0C;&#x5B89;&#x88C5;&#x7684;&#x662F; jdk-8u112-windows-i586_8.0.1120.15.exe &#x7248;&#x672C;&#xFF0C;windows 64&#x62A5;&#x9519;,</p>
<p>&#x914D;&#x7F6E;&#x7CFB;&#x7EDF;&#x73AF;&#x5883;&#x53D8;&#x91CF; &#x2013;&gt; &#x65B0;&#x5EFA; &#x2013;&gt; <code>_JAVA_OPTIONS</code> &#x2013;&gt;  <code>-Xmx512M</code> &#xFF0C; &#x7ED3;&#x679C;&#x662F;&#xFF1A;</p>
<p><img src="/2016/11/24/t12-&#x6DF7;&#x5408;APP&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x914D;&#x7F6E;/Android-SDK-06.png" alt="&#x6267;&#x884C;&#x547D;&#x4EE4;&#x65F6;&#x62A5;&#x9519;"></p>
<p>&#x7136;&#x540E;&#x53C8;&#x6362;&#x4E86; 64 &#x4F4D;&#x7684; jdk&#xFF0C;&#x5B98;&#x65B9;&#x7F51;&#x7AD9;&#x4E0B;&#x8F7D; jdk-8u112-windows-x64.exe</p>
<p>&#x4E4B;&#x540E;&#x56E0;&#x4E3A;&#x6211;&#x4E00;&#x4E2A;&#x6587;&#x4EF6;&#x540D;&#x5B57; build &#x5199;&#x9519;&#x4E86;&#x6CA1;&#x51FA;&#x6765;&#xFF0C;&#x4FEE;&#x6539;&#x4E86;&#x4E4B;&#x540E;&#x5C31;&#x6253;&#x5305;&#x6210;&#x529F;&#x4E86;&#x3002;</p>
<p>&#x6CE8;&#xFF1A;&#x4E3A;&#x4E86;&#x907F;&#x514D;&#x4E0D;&#x5FC5;&#x8981;&#x7684;&#x9EBB;&#x70E6;&#xFF1A;&#x6240;&#x6709;&#x8FD9;&#x4E00;&#x8FC7;&#x7A0B;&#x90FD;&#x5728; c &#x76D8;&#x6267;&#x884C;&#x7684;&#x3002;</p>
<h2 id="&#x4F7F;&#x7528;IONIC&#x5236;&#x4F5C;APP"><a href="#&#x4F7F;&#x7528;IONIC&#x5236;&#x4F5C;APP" class="headerlink" title="&#x4F7F;&#x7528;IONIC&#x5236;&#x4F5C;APP"></a>&#x4F7F;&#x7528;IONIC&#x5236;&#x4F5C;APP</h2><p>&#x6700;&#x540E;&#xFF0C;&#x6765;&#x4E00;&#x5F20;&#x603B;&#x56FE;&#xFF1A;</p>
<p><img src="/2016/11/24/t12-&#x6DF7;&#x5408;APP&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x914D;&#x7F6E;/Android-SDK-05.png" alt="&#x4F7F;&#x7528;IONIC&#x5236;&#x4F5C;APP"></p>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        
  <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
    <div>感谢您的支持！</div>
    <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
      <span>打 赏</span>
    </button>
    <div id="QR" style="display: none;">
      
        <div id="wechat" style="display: inline-block">
          <img id="wechat_qr" src="http://ofy7k3v4s.bkt.clouddn.com/wcpayCode.jpg" alt="Hongqin Ma WeChat Pay"/>
          <p>微信打赏</p>
        </div>
      
      
        <div id="alipay" style="display: inline-block">
          <img id="alipay_qr" src="http://ofy7k3v4s.bkt.clouddn.com/apayCode.jpg" alt="Hongqin Ma Alipay"/>
          <p>支付宝打赏</p>
        </div>
      
    </div>
  </div>


      
    </div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/ionic/" rel="tag">#ionic</a>
          
            <a href="/tags/cordova/" rel="tag">#cordova</a>
          
            <a href="/tags/tools/" rel="tag">#tools</a>
          
        </div>
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2016/11/19/s014-Node-留言列表小项目/" rel="next" title="Node-留言列表小项目">
                <i class="fa fa-chevron-left"></i> Node-留言列表小项目
              </a>
            
          </div>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2016/12/02/t13-webpack项目构建工具/" rel="prev" title="webpack 构建工具">
                webpack 构建工具 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
        <div class="ds-share flat" data-thread-key="2016/11/24/t12-混合APP开发环境配置/"
     data-title="混合APP开发环境配置-ionic、cordora"
     data-content=""
     data-url="https://hongqinma.github.io/2016/11/24/t12-混合APP开发环境配置/">
  <div class="ds-share-inline">
    <ul  class="ds-share-icons-16">

      <li data-toggle="ds-share-icons-more"><a class="ds-more" href="javascript:void(0);">分享到：</a></li>
      <li><a class="ds-weibo" href="javascript:void(0);" data-service="weibo">微博</a></li>
      <li><a class="ds-qzone" href="javascript:void(0);" data-service="qzone">QQ空间</a></li>
      <li><a class="ds-qqt" href="javascript:void(0);" data-service="qqt">腾讯微博</a></li>
      <li><a class="ds-wechat" href="javascript:void(0);" data-service="wechat">微信</a></li>

    </ul>
    <div class="ds-share-icons-more">
    </div>
  </div>
</div>
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
      <div class="ds-thread" data-thread-key="2016/11/24/t12-混合APP开发环境配置/"
           data-title="混合APP开发环境配置-ionic、cordora" data-url="https://hongqinma.github.io/2016/11/24/t12-混合APP开发环境配置/">
      </div>
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            Table of Contents
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            Overview
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel ">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="//schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/images/photo.jpg"
               alt="Hongqin Ma" />
          <p class="site-author-name" itemprop="name">Hongqin Ma</p>
          <p class="site-description motion-element" itemprop="description">Spell at all costs， to rush you in the future. </p>
        </div>
        <nav class="site-state motion-element">
          <div class="site-state-item site-state-posts">
            <a href="/archives">
              <span class="site-state-item-count">68</span>
              <span class="site-state-item-name">posts</span>
            </a>
          </div>

          
            <div class="site-state-item site-state-categories">
              <a href="/categories">
                <span class="site-state-item-count">16</span>
                <span class="site-state-item-name">categories</span>
              </a>
            </div>
          

          
            <div class="site-state-item site-state-tags">
              <a href="/tags">
                <span class="site-state-item-count">57</span>
                <span class="site-state-item-name">tags</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/HongqinMa" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://twitter.com/HongqinMa" target="_blank" title="Twitter">
                  
                    <i class="fa fa-fw fa-twitter"></i>
                  
                  Twitter
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://www.facebook.com/profile.php?id=100006581058735" target="_blank" title="Facebook">
                  
                    <i class="fa fa-fw fa-facebook"></i>
                  
                  Facebook
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="http://www.zhihu.com/people/HirakuMa" target="_blank" title="知乎">
                  
                    <i class="fa fa-fw fa-share-alt"></i>
                  
                  知乎
                </a>
              </span>
            
          
        </div>

        
        

        
        
          <div class="links-of-blogroll motion-element links-of-blogroll-inline">
            <div class="links-of-blogroll-title">
              <i class="fa  fa-fw fa-globe"></i>
              Links
            </div>
            <ul class="links-of-blogroll-list">
              
                <li class="links-of-blogroll-item">
                  <a href="http://www.cnblogs.com/rubylouvre/" title="司徒正美" target="_blank">司徒正美</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="http://www.cnblogs.com/sanshi/" title="三生石上" target="_blank">三生石上</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="http://www.cnblogs.com/TomXu/" title="汤姆大叔" target="_blank">汤姆大叔</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="http://gold.xitu.io/" title="掘金" target="_blank">掘金</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="https://segmentfault.com/" title="segmentfault" target="_blank">segmentfault</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="http://www.jianshu.com/users/1cbb94e5ed4d/latest_articles" title="简书" target="_blank">简书</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="https://home.cnblogs.com/" title="博客园" target="_blank">博客园</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="https://www.awesomes.cn/" title="Awesomes" target="_blank">Awesomes</a>
                </li>
              
            </ul>
          </div>
        

      </section>

      
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">
            
              
            
            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#java环境"><span class="nav-number">1.</span> <span class="nav-text">java环境</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#C-环境"><span class="nav-number">2.</span> <span class="nav-text">C++ 环境</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Android-ADT环境"><span class="nav-number">3.</span> <span class="nav-text">Android ADT环境</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#node-环境"><span class="nav-number">4.</span> <span class="nav-text">node 环境</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Git环境"><span class="nav-number">5.</span> <span class="nav-text">Git环境</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#cordova-ionic"><span class="nav-number">6.</span> <span class="nav-text">cordova ionic</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-条命令"><span class="nav-number">7.</span> <span class="nav-text">3 条命令</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#使用IONIC制作APP"><span class="nav-number">8.</span> <span class="nav-text">使用IONIC制作APP</span></a></li></ol></div>
            
          </div>
        </section>
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2016</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Hongqin Ma</span>
</div>

<div class="powered-by">
  Powered by <a class="theme-link" href="https://hexo.io">Hexo</a>
</div>

<div class="theme-info">
  Theme -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Muse
  </a>
</div>

<script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<span id="busuanzi_container_site_pv">
    &nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;Page Views: <span id="busuanzi_value_site_pv"></span> 
</span>

        

<div class="busuanzi-count">

  <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv"><i class="fa fa-user"></i><span class="busuanzi-value" id="busuanzi_value_site_uv"></span></span>
  

  
    <span class="site-pv"><i class="fa fa-eye"></i><span class="busuanzi-value" id="busuanzi_value_site_pv"></span></span>
  
  
</div>



        
      </div>
    </footer>

    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
    </div>
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  



  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.0.2"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.0.2"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.0.2"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.0.2"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.0.2"></script>



  

  
    
  

  <script type="text/javascript">
    var duoshuoQuery = {short_name:"Hiraku"};
    (function() {
      var ds = document.createElement('script');
      ds.type = 'text/javascript';ds.async = true;
      ds.id = 'duoshuo-script';
      ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
      ds.charset = 'UTF-8';
      (document.getElementsByTagName('head')[0]
      || document.getElementsByTagName('body')[0]).appendChild(ds);
    })();
  </script>

  
    
    <script src="/lib/ua-parser-js/dist/ua-parser.min.js?v=0.7.9"></script>
    <script src="/js/src/hook-duoshuo.js"></script>
  






  
  

  

  

  
  <script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.1.js"></script>
  <script>AV.initialize("PPmoIQxeu8Sd21h6Tl9TthNx-gzGzoHsz", "rTvbY2H7DvWzRipiBwn72RQ4");</script>
  <script>
    function showTime(Counter) {
      var query = new AV.Query(Counter);
      var entries = [];
      var $visitors = $(".leancloud_visitors");

      $visitors.each(function () {
        entries.push( $(this).attr("id").trim() );
      });

      query.containedIn('url', entries);
      query.find()
        .done(function (results) {
          var COUNT_CONTAINER_REF = '.leancloud-visitors-count';

          if (results.length === 0) {
            $visitors.find(COUNT_CONTAINER_REF).text(0);
            return;
          }

          for (var i = 0; i < results.length; i++) {
            var item = results[i];
            var url = item.get('url');
            var time = item.get('time');
            var element = document.getElementById(url);

            $(element).find(COUNT_CONTAINER_REF).text(time);
          }
          for(var i = 0; i < entries.length; i++) {
            var url = entries[i];
            var element = document.getElementById(url);
            var countSpan = $(element).find(COUNT_CONTAINER_REF);
            if( countSpan.text() == '') {
              countSpan.text(0);
            }
          }
        })
        .fail(function (object, error) {
          console.log("Error: " + error.code + " " + error.message);
        });
    }

    function addCount(Counter) {
      var $visitors = $(".leancloud_visitors");
      var url = $visitors.attr('id').trim();
      var title = $visitors.attr('data-flag-title').trim();
      var query = new AV.Query(Counter);

      query.equalTo("url", url);
      query.find({
        success: function(results) {
          if (results.length > 0) {
            var counter = results[0];
            counter.fetchWhenSave(true);
            counter.increment("time");
            counter.save(null, {
              success: function(counter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(counter.get('time'));
              },
              error: function(counter, error) {
                console.log('Failed to save Visitor num, with error message: ' + error.message);
              }
            });
          } else {
            var newcounter = new Counter();
            /* Set ACL */
            var acl = new AV.ACL();
            acl.setPublicReadAccess(true);
            acl.setPublicWriteAccess(true);
            newcounter.setACL(acl);
            /* End Set ACL */
            newcounter.set("title", title);
            newcounter.set("url", url);
            newcounter.set("time", 1);
            newcounter.save(null, {
              success: function(newcounter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(newcounter.get('time'));
              },
              error: function(newcounter, error) {
                console.log('Failed to create');
              }
            });
          }
        },
        error: function(error) {
          console.log('Error:' + error.code + " " + error.message);
        }
      });
    }

    $(function() {
      var Counter = AV.Object.extend("Counter");
      if ($('.leancloud_visitors').length == 1) {
        addCount(Counter);
      } else if ($('.post-title-link').length > 1) {
        showTime(Counter);
      }
    });
  </script>



  

  

  
  
  <!-- custom analytics part create by xiamo -->
<script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.1.js"></script>
<script>AV.initialize("PPmoIQxeu8Sd21h6Tl9TthNx-gzGzoHsz", "rTvbY2H7DvWzRipiBwn72RQ4");</script>
<script>
function showTime(Counter) {
  var query = new AV.Query(Counter);
  $(".leancloud_visitors").each(function() {
    var url = $(this).attr("id").trim();
    query.equalTo("url", url);
    query.find({
      success: function(results) {
        if (results.length == 0) {
          var content = '0 ' + $(document.getElementById(url)).text();
          $(document.getElementById(url)).text(content);
          return;
        }
        for (var i = 0; i < results.length; i++) {
          var object = results[i];
          var content = object.get('time') + ' ' + $(document.getElementById(url)).text();
          $(document.getElementById(url)).text(content);
        }
      },
      error: function(object, error) {
        console.log("Error: " + error.code + " " + error.message);
      }
    });

  });
}

function addCount(Counter) {
  var Counter = AV.Object.extend("Counter");
  url = $(".leancloud_visitors").attr('id').trim();
  title = $(".leancloud_visitors").attr('data-flag-title').trim();
  var query = new AV.Query(Counter);
  query.equalTo("url", url);
  query.find({
    success: function(results) {
      if (results.length > 0) {
        var counter = results[0];
        counter.fetchWhenSave(true);
        counter.increment("time");
        counter.save(null, {
          success: function(counter) {
            var content =  counter.get('time') + ' ' + $(document.getElementById(url)).text();
            $(document.getElementById(url)).text(content);
          },
          error: function(counter, error) {
            console.log('Failed to save Visitor num, with error message: ' + error.message);
          }
        });
      } else {
        var newcounter = new Counter();
        newcounter.set("title", title);
        newcounter.set("url", url);
        newcounter.set("time", 1);
        newcounter.save(null, {
          success: function(newcounter) {
              console.log("newcounter.get('time')="+newcounter.get('time'));
            var content = newcounter.get('time') + ' ' + $(document.getElementById(url)).text();
            $(document.getElementById(url)).text(content);
          },
          error: function(newcounter, error) {
            console.log('Failed to create');
          }
        });
      }
    },
    error: function(error) {
      console.log('Error:' + error.code + " " + error.message);
    }
  });
}
$(function() {
  var Counter = AV.Object.extend("Counter");
  if ($('.leancloud_visitors').length == 1) {
    addCount(Counter);
  } else if ($('.post-title-link').length > 1) {
    showTime(Counter);
  }
}); 
</script>

  
</body>
</html>
